package com.zhanghe.study.consumer;

import com.zhanghe.study.service.DemoService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author zh
 * @date 2022/7/1 16:02
 */
public class RunConsumer {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring-dubbo.xml");

        DemoService demoService = applicationContext.getBean("demoService",DemoService.class);

        System.out.println(demoService.sayHello("Han Meimei"));
        System.out.println(demoService.sayHello("Li Lei"));

        System.out.println(demoService.sayHello("Han Meimei"));
        System.out.println(demoService.sayHello("Li Lei"));

    }
}
